<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head><!-- start favicons snippet, use https://realfavicongenerator.net/ --><link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png"><link rel="manifest" href="/assets/site.webmanifest"><link rel="mask-icon" href="/assets/safari-pinned-tab.svg" color="#fc4d50"><link rel="shortcut icon" href="/assets/favicon.ico"><meta name="msapplication-TileColor" content="#ffc40d"><meta name="msapplication-config" content="/assets/browserconfig.xml"><meta name="theme-color" content="#ffffff"><!-- end favicons snippet -->
<title>DecoderInputBuffer (ExoPlayer library)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="DecoderInputBuffer (ExoPlayer library)";
        }
    }
    catch(err) {
    }
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":9,"i5":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">com.google.android.exoplayer2.decoder</a></div>
<h2 title="Class DecoderInputBuffer" class="title">Class DecoderInputBuffer</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="Buffer.html" title="class in com.google.android.exoplayer2.decoder">com.google.android.exoplayer2.decoder.Buffer</a></li>
<li>
<ul class="inheritance">
<li>com.google.android.exoplayer2.decoder.DecoderInputBuffer</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="../metadata/MetadataInputBuffer.html" title="class in com.google.android.exoplayer2.metadata">MetadataInputBuffer</a></code>, <code><a href="../text/SubtitleInputBuffer.html" title="class in com.google.android.exoplayer2.text">SubtitleInputBuffer</a></code>, <code><a href="../video/VideoDecoderInputBuffer.html" title="class in com.google.android.exoplayer2.video">VideoDecoderInputBuffer</a></code></dd>
</dl>
<hr>
<pre>public class <span class="typeNameLabel">DecoderInputBuffer</span>
extends <a href="Buffer.html" title="class in com.google.android.exoplayer2.decoder">Buffer</a></pre>
<div class="block">Holds input for a decoder.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!--   -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DecoderInputBuffer.BufferReplacementMode.html" title="annotation in com.google.android.exoplayer2.decoder">DecoderInputBuffer.BufferReplacementMode</a></span></code></th>
<td class="colLast">
<div class="block">The buffer replacement mode.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DecoderInputBuffer.InsufficientCapacityException.html" title="class in com.google.android.exoplayer2.decoder">DecoderInputBuffer.InsufficientCapacityException</a></span></code></th>
<td class="colLast">
<div class="block">Thrown when an attempt is made to write into a <a href="DecoderInputBuffer.html" title="class in com.google.android.exoplayer2.decoder"><code>DecoderInputBuffer</code></a> whose <a href="#bufferReplacementMode"><code>bufferReplacementMode</code></a> is <a href="#BUFFER_REPLACEMENT_MODE_DISABLED"><code>BUFFER_REPLACEMENT_MODE_DISABLED</code></a> and who <a href="#data"><code>data</code></a>
 capacity is smaller than required.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#BUFFER_REPLACEMENT_MODE_DIRECT">BUFFER_REPLACEMENT_MODE_DIRECT</a></span></code></th>
<td class="colLast">
<div class="block">Allows buffer replacement using <a href="https://developer.android.com/reference/java/nio/ByteBuffer.html#allocateDirect(int)" title="class or interface in java.nio" class="externalLink" target="_top"><code>ByteBuffer.allocateDirect(int)</code></a>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#BUFFER_REPLACEMENT_MODE_DISABLED">BUFFER_REPLACEMENT_MODE_DISABLED</a></span></code></th>
<td class="colLast">
<div class="block">Disallows buffer replacement.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#BUFFER_REPLACEMENT_MODE_NORMAL">BUFFER_REPLACEMENT_MODE_NORMAL</a></span></code></th>
<td class="colLast">
<div class="block">Allows buffer replacement using <a href="https://developer.android.com/reference/java/nio/ByteBuffer.html#allocate(int)" title="class or interface in java.nio" class="externalLink" target="_top"><code>ByteBuffer.allocate(int)</code></a>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="CryptoInfo.html" title="class in com.google.android.exoplayer2.decoder">CryptoInfo</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#cryptoInfo">cryptoInfo</a></span></code></th>
<td class="colLast">
<div class="block"><a href="CryptoInfo.html" title="class in com.google.android.exoplayer2.decoder"><code>CryptoInfo</code></a> for encrypted data.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="https://developer.android.com/reference/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="externalLink" target="_top">ByteBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#data">data</a></span></code></th>
<td class="colLast">
<div class="block">The buffer's data, or <code>null</code> if no data has been set.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="https://developer.android.com/reference/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="externalLink" target="_top">ByteBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#supplementalData">supplementalData</a></span></code></th>
<td class="colLast">
<div class="block">Supplemental data related to the buffer, if <a href="Buffer.html#hasSupplementalData()"><code>Buffer.hasSupplementalData()</code></a> returns true.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#timeUs">timeUs</a></span></code></th>
<td class="colLast">
<div class="block">The time at which the sample should be presented.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#waitingForKeys">waitingForKeys</a></span></code></th>
<td class="colLast">
<div class="block">Whether the last attempt to read a sample into this buffer failed due to not yet having the DRM
 keys associated with the next sample.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(int)">DecoderInputBuffer</a></span>&#8203;(int&nbsp;bufferReplacementMode)</code></th>
<td class="colLast">
<div class="block">Creates a new instance.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(int,int)">DecoderInputBuffer</a></span>&#8203;(int&nbsp;bufferReplacementMode,
                  int&nbsp;paddingSize)</code></th>
<td class="colLast">
<div class="block">Creates a new instance.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#clear()">clear</a></span>()</code></th>
<td class="colLast">
<div class="block">Clears the buffer.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureSpaceForWrite(int)">ensureSpaceForWrite</a></span>&#8203;(int&nbsp;length)</code></th>
<td class="colLast">
<div class="block">Ensures that <a href="#data"><code>data</code></a> is large enough to accommodate a write of a given length at its
 current position.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#flip()">flip</a></span>()</code></th>
<td class="colLast">
<div class="block">Flips <a href="#data"><code>data</code></a> and <a href="#supplementalData"><code>supplementalData</code></a> in preparation for being queued to a decoder.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isEncrypted()">isEncrypted</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns whether the <a href="../C.html#BUFFER_FLAG_ENCRYPTED"><code>C.BUFFER_FLAG_ENCRYPTED</code></a> flag is set.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static <a href="DecoderInputBuffer.html" title="class in com.google.android.exoplayer2.decoder">DecoderInputBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#newNoDataInstance()">newNoDataInstance</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a new instance that's not able to hold any data.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resetSupplementalData(int)">resetSupplementalData</a></span>&#8203;(int&nbsp;length)</code></th>
<td class="colLast">
<div class="block">Clears <a href="#supplementalData"><code>supplementalData</code></a> and ensures that it's large enough to accommodate <code>
 length</code> bytes.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.com.google.android.exoplayer2.decoder.Buffer">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;com.google.android.exoplayer2.decoder.<a href="Buffer.html" title="class in com.google.android.exoplayer2.decoder">Buffer</a></h3>
<code><a href="Buffer.html#addFlag(int)">addFlag</a>, <a href="Buffer.html#clearFlag(int)">clearFlag</a>, <a href="Buffer.html#getFlag(int)">getFlag</a>, <a href="Buffer.html#hasSupplementalData()">hasSupplementalData</a>, <a href="Buffer.html#isDecodeOnly()">isDecodeOnly</a>, <a href="Buffer.html#isEndOfStream()">isEndOfStream</a>, <a href="Buffer.html#isKeyFrame()">isKeyFrame</a>, <a href="Buffer.html#setFlags(int)">setFlags</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></h3>
<code><a href="https://developer.android.com/reference/java/lang/Object.html#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink" target="_top">wait</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a id="BUFFER_REPLACEMENT_MODE_DISABLED">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BUFFER_REPLACEMENT_MODE_DISABLED</h4>
<pre>public static final&nbsp;int BUFFER_REPLACEMENT_MODE_DISABLED</pre>
<div class="block">Disallows buffer replacement.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.decoder.DecoderInputBuffer.BUFFER_REPLACEMENT_MODE_DISABLED">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="BUFFER_REPLACEMENT_MODE_NORMAL">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BUFFER_REPLACEMENT_MODE_NORMAL</h4>
<pre>public static final&nbsp;int BUFFER_REPLACEMENT_MODE_NORMAL</pre>
<div class="block">Allows buffer replacement using <a href="https://developer.android.com/reference/java/nio/ByteBuffer.html#allocate(int)" title="class or interface in java.nio" class="externalLink" target="_top"><code>ByteBuffer.allocate(int)</code></a>.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.decoder.DecoderInputBuffer.BUFFER_REPLACEMENT_MODE_NORMAL">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="BUFFER_REPLACEMENT_MODE_DIRECT">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BUFFER_REPLACEMENT_MODE_DIRECT</h4>
<pre>public static final&nbsp;int BUFFER_REPLACEMENT_MODE_DIRECT</pre>
<div class="block">Allows buffer replacement using <a href="https://developer.android.com/reference/java/nio/ByteBuffer.html#allocateDirect(int)" title="class or interface in java.nio" class="externalLink" target="_top"><code>ByteBuffer.allocateDirect(int)</code></a>.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.decoder.DecoderInputBuffer.BUFFER_REPLACEMENT_MODE_DIRECT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="cryptoInfo">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cryptoInfo</h4>
<pre>public final&nbsp;<a href="CryptoInfo.html" title="class in com.google.android.exoplayer2.decoder">CryptoInfo</a> cryptoInfo</pre>
<div class="block"><a href="CryptoInfo.html" title="class in com.google.android.exoplayer2.decoder"><code>CryptoInfo</code></a> for encrypted data.</div>
</li>
</ul>
<a id="data">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>data</h4>
<pre>@Nullable
public&nbsp;<a href="https://developer.android.com/reference/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="externalLink" target="_top">ByteBuffer</a> data</pre>
<div class="block">The buffer's data, or <code>null</code> if no data has been set.</div>
</li>
</ul>
<a id="waitingForKeys">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>waitingForKeys</h4>
<pre>public&nbsp;boolean waitingForKeys</pre>
<div class="block">Whether the last attempt to read a sample into this buffer failed due to not yet having the DRM
 keys associated with the next sample.</div>
</li>
</ul>
<a id="timeUs">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>timeUs</h4>
<pre>public&nbsp;long timeUs</pre>
<div class="block">The time at which the sample should be presented.</div>
</li>
</ul>
<a id="supplementalData">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>supplementalData</h4>
<pre>@Nullable
public&nbsp;<a href="https://developer.android.com/reference/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="externalLink" target="_top">ByteBuffer</a> supplementalData</pre>
<div class="block">Supplemental data related to the buffer, if <a href="Buffer.html#hasSupplementalData()"><code>Buffer.hasSupplementalData()</code></a> returns true. If
 present, the buffer is populated with supplemental data from position 0 to its limit.</div>
</li>
</ul>
</li>
</ul>
</section>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DecoderInputBuffer</h4>
<pre>public&nbsp;DecoderInputBuffer&#8203;(<a href="DecoderInputBuffer.BufferReplacementMode.html" title="annotation in com.google.android.exoplayer2.decoder">@BufferReplacementMode</a>
                          int&nbsp;bufferReplacementMode)</pre>
<div class="block">Creates a new instance.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bufferReplacementMode</code> - The <a href="DecoderInputBuffer.BufferReplacementMode.html" title="annotation in com.google.android.exoplayer2.decoder"><code>DecoderInputBuffer.BufferReplacementMode</code></a> replacement mode.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(int,int)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DecoderInputBuffer</h4>
<pre>public&nbsp;DecoderInputBuffer&#8203;(<a href="DecoderInputBuffer.BufferReplacementMode.html" title="annotation in com.google.android.exoplayer2.decoder">@BufferReplacementMode</a>
                          int&nbsp;bufferReplacementMode,
                          int&nbsp;paddingSize)</pre>
<div class="block">Creates a new instance.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bufferReplacementMode</code> - The <a href="DecoderInputBuffer.BufferReplacementMode.html" title="annotation in com.google.android.exoplayer2.decoder"><code>DecoderInputBuffer.BufferReplacementMode</code></a> replacement mode.</dd>
<dd><code>paddingSize</code> - If non-zero, <a href="#ensureSpaceForWrite(int)"><code>ensureSpaceForWrite(int)</code></a> will ensure that the buffer
     is this number of bytes larger than the requested length. This can be useful for decoders
     that consume data in fixed size blocks, for efficiency. Setting the padding size to the
     decoder's fixed read size is necessary to prevent such a decoder from trying to read beyond
     the end of the buffer.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a id="newNoDataInstance()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>newNoDataInstance</h4>
<pre class="methodSignature">public static&nbsp;<a href="DecoderInputBuffer.html" title="class in com.google.android.exoplayer2.decoder">DecoderInputBuffer</a>&nbsp;newNoDataInstance()</pre>
<div class="block">Returns a new instance that's not able to hold any data.</div>
</li>
</ul>
<a id="resetSupplementalData(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resetSupplementalData</h4>
<pre class="methodSignature">@EnsuresNonNull("supplementalData")
public&nbsp;void&nbsp;resetSupplementalData&#8203;(int&nbsp;length)</pre>
<div class="block">Clears <a href="#supplementalData"><code>supplementalData</code></a> and ensures that it's large enough to accommodate <code>
 length</code> bytes.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>length</code> - The length of the supplemental data that must be accommodated, in bytes.</dd>
</dl>
</li>
</ul>
<a id="ensureSpaceForWrite(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureSpaceForWrite</h4>
<pre class="methodSignature">@EnsuresNonNull("data")
public&nbsp;void&nbsp;ensureSpaceForWrite&#8203;(int&nbsp;length)</pre>
<div class="block">Ensures that <a href="#data"><code>data</code></a> is large enough to accommodate a write of a given length at its
 current position.

 <p>If the capacity of <a href="#data"><code>data</code></a> is sufficient this method does nothing. If the capacity is
 insufficient then an attempt is made to replace <a href="#data"><code>data</code></a> with a new <a href="https://developer.android.com/reference/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="externalLink" target="_top"><code>ByteBuffer</code></a>
 whose capacity is sufficient. Data up to the current position is copied to the new buffer.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>length</code> - The length of the write that must be accommodated, in bytes.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DecoderInputBuffer.InsufficientCapacityException.html" title="class in com.google.android.exoplayer2.decoder">DecoderInputBuffer.InsufficientCapacityException</a></code> - If there is insufficient capacity to accommodate the
     write and <a href="#bufferReplacementMode"><code>bufferReplacementMode</code></a> is <a href="#BUFFER_REPLACEMENT_MODE_DISABLED"><code>BUFFER_REPLACEMENT_MODE_DISABLED</code></a>.</dd>
</dl>
</li>
</ul>
<a id="isEncrypted()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isEncrypted</h4>
<pre class="methodSignature">public final&nbsp;boolean&nbsp;isEncrypted()</pre>
<div class="block">Returns whether the <a href="../C.html#BUFFER_FLAG_ENCRYPTED"><code>C.BUFFER_FLAG_ENCRYPTED</code></a> flag is set.</div>
</li>
</ul>
<a id="flip()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>flip</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;flip()</pre>
<div class="block">Flips <a href="#data"><code>data</code></a> and <a href="#supplementalData"><code>supplementalData</code></a> in preparation for being queued to a decoder.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://developer.android.com/reference/java/nio/Buffer.html#flip()" title="class or interface in java.nio" class="externalLink" target="_top"><code>Buffer.flip()</code></a></dd>
</dl>
</li>
</ul>
<a id="clear()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>clear</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;clear()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="Buffer.html#clear()">Buffer</a></code></span></div>
<div class="block">Clears the buffer.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="Buffer.html#clear()">clear</a></code>&nbsp;in class&nbsp;<code><a href="Buffer.html" title="class in com.google.android.exoplayer2.decoder">Buffer</a></code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>
